#ifndef _CLIENTENTITYMANAGER_
#define _CLIENTENTITYMANAGER_

#include "Objects/EntityManager.hpp"
#include "Character.hpp"
#include "Player.hpp"

/** 
* Client's character entity manager.
*/
class ClientEntityManager: public EntityManager{
public:
	/** 
	* Character entities.
	*/
	Character** entities;

	/** 
	* Player entities.
	*/
	Player** players;

	Player* player;

	byte maxPlayers;

	ClientEntityManager();

    virtual void bind(lua_State* luaState);
    virtual void push(lua_State* luaState);
    
	virtual void update(unsigned int frameTime);
    
	virtual Entity* createEntity(const char* name);
	virtual Entity* createEntity(const char* name, uint16_t index);

	virtual bool destroyEntity(Entity* ent);
	virtual bool destroyEntity(uint16_t index);
};

#endif